generated from javidahmed64592/template-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Update configuration handling #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ly used and create it if missing; add temporary config path fixture for tests
…tructions and update related sections
…nd integrate self-signed certificate generation into TemplateServer run method
…rectory creation in Dockerfile; clean up test imports
…ion via command-line arguments and update Docker setup to use environment variable for port
… improve error handling for missing config, and update tests to reflect changes
…rror handling, and ensure certificate generation is verified
…e configuration with default value
…es and adjust log format; update server configuration to set log level and disable access log
…odel checking for clarity
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request simplifies configuration management for the Python template server. The changes improve configuration file handling, update default port and security settings, and enhance logging and workflow documentation.
Key changes include:
Removal of Built-in SSL Certificate Generation
Removed the
generate-certificatescript and all related code, including command-line instructions, documentation, and Dockerfile logic for generating self-signed SSL certificates. Certificate creation is no longer handled by the application, and users are expected to provide certificates via deployment configuration if needed. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]The Dockerfile and docker-compose files no longer create or mount certificates by default; health checks and server startup scripts have been updated to use the configurable port and omit certificate generation. [1] [2] [3] [4]
Configuration and Packaging Simplification
The
configuration/directory is no longer included in the built wheel or checked in the build workflow. Configuration files are now copied directly into the Docker image at build time, and the code ensures configuration directories are created as needed. [1] [2] [3] [4] [5]The default server host is now
0.0.0.0and the default port is443(waslocalhost:8000), matching typical production deployment expectations.Security and Logging Improvements
The default Content Security Policy (CSP) is now stricter and more comprehensive, covering scripts, styles, and images from specific sources.
Request logging now includes both client IP and port, and the log format has been slightly improved for clarity. [1] [2]
Documentation and Workflow Updates
Updated all documentation and workflow files to reflect the removal of certificate generation, new configuration practices, and the introduction of the
PORTenvironment variable for flexible server port assignment. [1] [2] [3] [4]CI/CD workflows have been clarified and improved, with explicit build, security, and audit steps.
Minor Enhancements
Coverage configuration now includes both the application and tests.
Added missing imports and improved code organization in
template_server.py. [1] [2]